package com.ly.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.ly.bean.EasybuyOrderDetail;
import com.ly.mapper.EasybuyOrderDetailMapper;
import com.ly.service.OrderDetailService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author 李岩
 * @date 2021/12/20-19:36
 * @describe
 */
@Component
@Service(interfaceClass = OrderDetailService.class)
public class OrderDetailServiceImpl implements OrderDetailService {
    private final Logger logger= LoggerFactory.getLogger(OrderDetailServiceImpl.class);
    private OrderDetailServiceImpl(){
        System.out.println("OrderDetailServiceImpl   的service层");
    }
    @Autowired
    private EasybuyOrderDetailMapper orderDetailMapper;

    //根据用户id和订单id获取订单详情
    @Override
    public List<EasybuyOrderDetail> selectOrderDetailsByorderId(Integer orderId) throws Exception {
        return orderDetailMapper.selectOrderDetailsByorderId(orderId);
    }
}
